/* enum */
import ComponentNameEnum from '@model/enum/ComponentNameEnum'
/* scss */
import '@src/component/ui/UiWxTag/UiWxTag.scss'
/* utils */
import { createNoPrefixNamespace } from '@src/util/create'
import { CreateElement } from 'vue'

const [createComponent, bem] = createNoPrefixNamespace(ComponentNameEnum.UiWxTag)

export type UiWxTagProps = {
  isText: boolean
}

function UiWxTag(h: CreateElement, props: UiWxTagProps) {  
  if (props.isText) {
    return (
      <span class={[ComponentNameEnum.UiWxTag, `${ComponentNameEnum.UiWxTag}-text`]}>
        @微信
      </span>
    )
  }
  
  return (
    <div class={ComponentNameEnum.UiWxTag}>
      @微信
    </div>
  )
}

UiWxTag.props = {
  isText: {
    type: Boolean,
    default: false
  }
}

export default createComponent<UiWxTagProps>(UiWxTag)